// import { useMemo, FC } from 'react';
import { FormPath } from '@formily/core'
import {
    useField,
  } from '@formily/react';
/**
 * 
 * @returns 返回当前Field绝对路径
 */
export const useGetValue =()=>{
        const field = useField();
        try{
            if(field){
                return field?.address?.entire;
            }
        }catch(err){
            console.warn(`${err}获取当前值`);
            return '';
        }
}

/**
 * 获取表单值
 */
export const getValue=(vaule:any, path:any)=>{
     return FormPath.getIn(vaule, path);
}
